import { Injectable } from '@nestjs/common';
import { join } from "path";
import { GetLogPageDto } from './log.dto'
import { RESPONSE_CODE } from '@/enums/code';

@Injectable()
export class LogService {

  /**
   * 日志分页
   * @param getLogPageDto 
   * @returns 
   */
  async getLogPage(getLogPageDto: GetLogPageDto) {
    // const { current, size } = getLogPageDto;
    // const fileName = join(logDir, "application-%DATE%.log");
    // const file = await readFileSync(fileName, { encoding: "utf-8" });
    // return {
    //   code: RESPONSE_CODE.SUCCESS,
    //   data,
    //   msg: null,
    // }

    return {
      code: RESPONSE_CODE.SUCCESS,
      data: [],
      msg: null,
    }
  }
}
